package io.chenglicun.modules.bus.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.chenglicun.common.utils.DateUtils;
import io.chenglicun.common.validator.group.AddGroup;
import io.chenglicun.common.validator.group.DefaultGroup;
import io.chenglicun.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;

/**
* 业务_公告
*
* @author HB 137664951@qq.com
* @since 1.0 2023-08-30
*/
@Data
@ApiModel(value = "业务_公告")
public class BusNoticeDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private Long id;
    @ApiModelProperty(value = "通告类型")
    @NotNull(message="通告类型不能为空", groups = DefaultGroup.class)
    private String type;
    @ApiModelProperty(value = "标题")
    @NotNull(message="标题不能为空", groups = DefaultGroup.class)
    private String title;
    @ApiModelProperty(value = "正文类型（0：富文本 1：视频 2：PDF 3:图片）")
    @NotNull(message="正文类型不能为空", groups = DefaultGroup.class)
    private Integer textType;
    @ApiModelProperty(value = "富文本内容")
    private String textContent;
    @ApiModelProperty(value = "视频内容")
    private String videoContent;
    @ApiModelProperty(value = "PDF内容")
    private String pdfContent;
    @ApiModelProperty(value = "简述")
    private String description;
    @ApiModelProperty(value = "预览图片")
    private String image;
    @ApiModelProperty(value = "排序")
    private Integer sort;
    @ApiModelProperty(value = "是否发布（0：不发布1：发布）")
    private Integer isPublish;
    @ApiModelProperty(value = "是否置顶（0：不置顶1：置顶）")
    private Integer isTopped;
    @ApiModelProperty(value = "创建者")
    private Long creator;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createDate;
    @ApiModelProperty(value = "更新者")
    private Long updater;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date updateDate;
    @ApiModelProperty(value = "活动-0 制度-1")
    private Integer tabType;
    @ApiModelProperty(value = "经营范围")
    private String businessScope;
    @ApiModelProperty(value = "地址")
    private String address;

}
